home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Tools (InfoMagic)
/
Internet Tools.iso
/
applic
/
ncsa
/
tn3270
/
binhex.helpcms.Z
/
binhex.helpcms
Wrap
Text File
|
1989-11-18
|
11KB
|
225 lines
.fo off
.cs 1 on
BINHEX
Use the BINHEX command to work with Macintosh files containing binary data
which are stored in CMS. BINHEX may be used with HQX files, such as those
created by BinHex 4.0 on the Macintosh, and also with BIN files, such as those
created by BinHex 5.0. BINHEX checks files in these formats, describes the
contents of the files, and converts between the two formats.
.cs 1 off
.cs 2 on
The format of the BINHEX command is:
┌──────────╛──────────────────────────────────────────────────────────────────┐
│ │ │
│ BINHEX │ ? | Check | Describe | COnvert fn <ft <fm >> [(options...[)]] │
│ │ │
│ │ Options: │
│ │ ┌ ┐ ┌ ┐ ┌ ┐ │
│ │ │To fm │ │Stack │ │Fifo │ │
│ │ │Rate cps │ │Lifo │ │STEm stm │ │
│ │ └ ┘ └ ┘ └ ┘ │
│ │ │
└──────────╩──────────────────────────────────────────────────────────────────┘
.cs 2 off
.cs 3 on
OPERANDS
? causes BINHEX to type a brief description of the command format,
including all the valid operands and options. When "?" is specified,
the remainder of the command line is ignored.
Check cause BINHEX to check the input file for errors, such as missing or
corrupted data. BINHEX will either report there are no errors, or
respond with an error message describing the problem. BINHEX also
checks the input file when the Describe or COnvert operand is
specified.
Describe causes BINHEX to display information about the input file, including
the full Macintosh filename, the type, creator, flags values, and the
sizes of the data and resource forks. See the "Responses" section
below for examples of the information which is displayed.
COnvert causes BINHEX to convert the input file from BinHex to MacBinary
format or vice-versa. The resulting file has the same filename as
the input file, and a filetype of either BIN (for MacBinary format)
or HQX (for BinHex format). The file is written to the same disk as
the input file, unless the "To" option has been specified.
fn specifies the filename of the input file.
ft specifies the filetype of the input file. When "ft" is omitted or
specified as "*", all filetypes will be searched to find a match for
"fn".
fm specifies the filemode of the input file. When "fm" is omitted or
specified as "*", all accessed disks will be searched for a file
matching "fn" and "ft".
OPTIONS
To fm specifies the disk to which the output file will be written when the
"COnvert" operand is specified. When "To" is omitted, the output
file is written to the same disk as the input file.
Rate cps specifies a file transfer rate in characters per second. When a rate
is specified, the information displayed by the "Describe" function
will include an estimate of the time required to download the file.
Stack cause the output from the "Describe" function to be stacked in FIFO
order. "Fifo" is a synonym for "Stack".
Lifo causes the output from the "Describe" function to be stacked in LIFO
order.
Fifo cause the output from the "Describe" function to be stacked in FIFO
order. "Stack" is a synonym for "Fifo".
STEm stm causes the output from the "Describe" function to be stored directly
into REXX or EXEC2 variables. "stm" is the name of the stem for
these variables, i.e. the characters preceding a period in their
names. Only the first eight characters of "stm" are significant.
The following variables are defined:
stm.FN CMS filename
stm.FT CMS filetype
stm.FM CMS filemode
stm.FORMAT BinHex or MacBinary
stm.NAME Mac filename
stm.TYPE Mac type
stm.CREATOR Mac creator
stm.FLAGS Mac flags
stm.DATASIZE Mac data fork size
stm.RESCSIZE Mac resource fork size
stm.CRDATE Mac creation date
stm.MDDATE Mac last modified date
stm.CHARCNT Total character count
stm.TIMEEST Download time estimate
The creation and last modified dates are not defined for BinHex
format files, which do not include them. The time estimate is
defined only when the Rate option has been specified.
USING THE BINHEX COMMAND
The BINHEX command allows Macintosh users to obtain information about files
stored in CMS which would ordinarily not be available until the files had been
downloaded to a Macintosh. The Check function verifies that a file will be
accepted by BinHex on the Macintosh, and the Describe function provides
detailed information about a file. With this information, a Macintosh user can
often avoid spending time downloading unwanted files or files which contain
errors. The COnvert function provides conversion between the two file formats
BINHEX accepts: BinHex format and MacBinary format. Conversion is useful
because each of these formats offers advantages for storing Macintosh programs.
BinHex format is used by BinHex 4.0 on the Macintosh. It consists of a header,
the data fork, and the resource fork of a Macintosh file, compressed and
converted to printable characters. Converting a file from binary to printable
characters increases its size (in spite of the inclusion of file compression).
However, since they contain only printable characters, BinHex files can be
included in electronic mail, and can be uploaded and downloaded in nearly any
environment. In CMS, BinHex files usually are given filetypes containing
"HQX", and may have fixed or variable-length records. The files usually begin
with the line
(This file must be converted with BinHex 4.0)
MacBinary format is used by BinHex 5.0 and MacTerminal on the Macintosh. It is
similar to BinHex format, but retains the file contents in binary form instead
of converting to printable characters. It also includes the dates the
Macintosh file was created and last modified, and some extra flag bits.
MacBinary is the most compact format for storing a Macintosh file. However,
because MacBinary files retain binary data, they can be uploaded and downloaded
only by programs which use an 8-bit data path. Usually, such a path is not
available for VM/CMS systems. Programs such as Kermit can simulate an 8-bit
path using printable characters, but only at the expense of a much longer
transfer time. MacBinary files in CMS usually are given filetypes containing
"BIN". They consist of fixed-length 128-byte records.
USAGE NOTES
1) Although the filetype of the input file will usually indicate which format
it is in, BINHEX determines the file's format by examining its
characteristics. If the file has fixed-length 128-byte records, BINHEX
assumes MacBinary format. Otherwise, BINHEX assumes BinHex format.
2) The data in a BinHex format file begins with a line containing a colon in
column one, and ends with a line having a colon as the last character.
CMS BINHEX skips any other lines in the file. However, BinHex on the
Macintosh only skips the comment line "(This file must be converted with
BinHex 4.0)". Thus, even when the Check function reports no errors, it
may still be necessary to delete extraneous lines from the BinHex file
before BinHex on the Macintosh will accept the file.
3) BinHex format files do not contain all the information included in
MacBinary files. In particular, the creation and last modified dates, and
some flag bits are not stored. As a result, this information is lost when
the COnvert function is used to convert from MacBinary to BinHex format.
4) BINHEX cannot detect if the input file is not in either MacBinary or
BinHex format. In this case, BINHEX will usually assume the file is in
BinHex format, and give an "unexpected end-of-file" message when it fails
to find the first line of BinHex data.
5) For a BinHex file, the maximum line length BINHEX can process is 256.
RESPONSES
'fn ft fm': No errors detected.
This is the normal response from the Check function. This response
is omitted when BINHEX is called from a CMS command, or from an exec
file with "address COMMAND" in effect.
File: 'STARS16 HQX T1' Format: BinHex
Filename: 'Stars 1.6'
Type: 'DFIL' Creator: 'DMOV' Flags: none
Data fork size: 0; Resource fork size: 6,054
Character count: 10,140.
This is the response from the Describe function for a BinHex file
when the Rate option is not used. This is the shortest possible
description.
File: 'TERM412 BIN M1' Format: MacBinary
Filename: 'Term 4.12'
Type: 'APPL' Creator: 'TRMA' Flags: Bndl+Init
Data fork size: 0; Resource fork size: 52,947
Created: Thu, May 28, 1987 2:01:25 AM
Last Modified: Thu, May 28, 1987 2:02:04 AM
Character count: 53,120 (4 minutes, 55 seconds at 180 cps).
This is the response from the Describe function for a MacBinary file
when the Rate option is used. This is the longest possible
description.
OTHER MESSAGES AND RETURN CODES
DMSBIN631E 'STEM' option is only available from an EXEC2 or REXX exec.
RC=4
DMSBIN001E Error in command after 'token'. RC=24
DMSBIN002I Issue BINHEX ? or HELP CMS BINHEX for more information.
DMSBIN003E Invalid option 'xxxxxxxx'. RC=24
DMSBIN010E Invalid rate 'xxxxxxxx'. RC=24
DMSBIN048E Invalid mode 'xxxxxxxx'. RC=24
DMSBIN637E Missing value for the 'STEM' option. RC=24
DMSBIN002E File 'fn ft fm' not found. RC=28
DMSBIN024E File 'fn ft fm' already exists. RC=28
DMSBIN044E Record length exceeds allowable maximum. RC=32
DMSBIN005E Invalid character 'x' in 'fn ft fm' at line mmmmmm position
nnn. RC=36
DMSBIN006E Unexpected end-of-file reading 'fn ft fm'. RC=36
DMSBIN037E Disk 'mode' is read-only. RC=36
DMSBIN069E Disk 'mode' not accessed. RC=36
DMSBIN007E 'fn ft fm': CRC error for BinHex header. RC=44
DMSBIN008E 'fn ft fm': CRC error for BinHex data fork. RC=44
DMSBIN009E 'fn ft fm': CRC error for BinHex resource fork. RC=44
DMSBIN104S Error 'nn' reading file 'fn ft fm' from disk. RC=1nn
DMSBIN105S Error 'nn' writing file 'fn ft fm' on disk. RC=1nn
DMSBIN632E Error setting EXEC variable: RC=nnnnn from 'EXECCOMM'. RC=200
.cs 3 off